import Vue from 'vue';
import Main from '@/components/Player';
 
const MainConstructor = Vue.extend(Main)
let instance // 单例模式
let documentS = null;
const Players = () => {
	// console.log('44444444',instance);
    if(!instance) {
        instance = new MainConstructor().$mount()
		
		
		// console.log('tttttttttthis',documentS);
        // instance.show = true
		// setTimeout(() => {
		// 	const query = uni.createSelectorQuery();
		// 	query.selectAll('body').boundingClientRect();
		// 	query.exec((res) => {
		// 	  console.log(
		// 	res,'ttttttttttttttt'); // 输出body节点的边界框信息
		// 	});
		// },2000)  
		// document.body.appendChild(instance.$el)
		// let div = uni.createSelectorQuery().select('body')
		// console.log(div);
    } else { 
        
    }
	return;
	// console.log('9999999',instance.show);
    instance.show = true;
	instance.getList();
 
}

const setDcocument = (val) => {
	// console.log('valllllllll',val);
	documentS = val;
};
 
export default {Players,setDcocument} // 第一次调用Message()会把弹窗挂载到body上，后面再调用的时候直接让弹窗显示，可以传递参数，instance.show或instance.$data.show访问data数据